<template>
  <div id="app">
    <el-dialog
        :visible.sync="userDialog" title="公司人员信息"
        width="50%"
        center
        :show-close="true"
        :before-close="userClose"
    >
    <el-table :data="companyUserData"
              max-height="700px"
              border stripe :cell-style="{ 'textAlign': 'center' }"
              :header-cell-style="{ 'textAlign': 'center' }">
      <el-table-column prop="userId" label="ID"></el-table-column>
      <el-table-column prop="userName" label="用户名"></el-table-column>
      <el-table-column prop="roleName" label="角色名"></el-table-column>
      <el-table-column prop="phoneNum" label="手机号"></el-table-column>
    </el-table>
    </el-dialog>

  </div>
</template>

<script>
export default {
  name: "checkCompanyUser",
  data() {
    return {
      companyUserData: [],
      userDialog:false,
    }
  },
  // props: {
  //   toCompanyId: {
  //     type: Number,
  //     default: 0
  //   }
  // },
  created() {},
  methods: {
    handleOpen(val){
      this.$api.companyGetCompanyPersonList({companyId:val.companyId}).then(res => {
        if(res) {
          this.companyUserData = res
        }
      })
      this.userDialog=true
    },
    userClose(){
      this.userDialog=false
    }
  }
}
</script>

<style scoped>

</style>